const KoaRouter = require('koa-router');

const fileRouter = new KoaRouter({prefix: '/upload'});

const {
  verifyAuth
} = require('../middleware/auth.middleware');

const {
  avatarHandler
} = require('../middleware/file.middleware');

const {
  seaveAvatarInfo
} = require('../controller/file.controller');

// 上传用户头像
fileRouter.post('/avatar', verifyAuth, avatarHandler, seaveAvatarInfo);

module.exports = fileRouter;